package com.qf.j2105.controller;


import com.qf.j2105.vo.McVo;
import com.qf.j2105.service.McService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController

public class McController {
    @Autowired
    private McService mcService;

    @RequestMapping(value = "/cars",method = RequestMethod.GET)
    public List<McVo> cars(){
        List<McVo> all = mcService.findAll();
        return all;
    }
}
